package com.cskaoyan.controller.back;

import com.cskaoyan.bean.po.BasePageInfo;
import com.cskaoyan.bean.po.CommonData;
import com.cskaoyan.bean.po.MarketLog;
import com.cskaoyan.bean.vo.back.BaseRespVo;
import com.cskaoyan.service.back.LogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 12-江涛
 * @since 2022/10/13  0:35
 */
@RestController
@RequestMapping("admin")
public class LogController {

    @Autowired
    LogService logService;

    /*
     * 操作日志（显示列表）
     * http://182.92.235.201:8083/admin/log/list
     *
     * @return
     * @Author 12-江涛
     * @Date  2022/10/13 0:39
     */
    @RequiresPermissions("admin:log:list")
    @RequestMapping("log/list")
    public BaseRespVo list(BasePageInfo basePageInfo,String name) {

        CommonData<MarketLog> commonDataVO = logService.logList(basePageInfo,name);

        return BaseRespVo.ok(commonDataVO);
    }

}
